package ar.com.gals.service;

import java.util.List;

import ar.com.gals.domain.Indice;
import ar.com.gals.domain.Usuario;
import ar.com.gals.error.GalsException;
import ar.com.gals.repository.IndiceRepository;


public class IndiceService extends AbstractService<Indice> {

	public IndiceService() {
		this.domain = Indice.class;
	}

	
	public List<Indice> getAll(Usuario usuario) throws GalsException {
		
		List<Indice> list = null;
		
		try
		{
			this.beginTransaction();
		
			list = new IndiceRepository(this.session).getAll(usuario);
			
			this.commit();
		}
		catch(Exception e) {
			
			this.rollback();
			
			throw new GalsException(e.getMessage());
		}
		
		return list;
	}
}
